import { ProSchema } from "@ant-design/pro-components";
import service from "./service";

export default <ProSchema[]>[
  {
    title: '部门id',
    dataIndex: 'id',
    disabled: true
  },
  {
    title: '上级部门',
    dataIndex: 'parentId',
    valueType: 'treeSelect',
    request: service.list
  },
  {
    title: '部门名称',
    dataIndex: 'deptName',
    valueType: 'text',
  },
  {
    title: '显示顺序',
    dataIndex: 'orderNum',
    valueType: 'text',
  },
  {
    title: '负责人',
    dataIndex: 'leader',
    valueType: 'text',
  },
  {
    title: '联系电话',
    dataIndex: 'phone',
    valueType: 'text',
  },
  {
    title: '邮箱',
    dataIndex: 'email',
    valueType: 'text',
  },
  {
    title: '部门状态',
    dataIndex: 'status',
    valueType: 'radio',
    valueEnum: {
      '0': '正常',
      '1': '停用'
    },
  },
]